<template>
  <div class="mx-container">
    <zz-sub-nav :list="list" :index.sync="index">
      <div class="sub-nav-content">
        <div>
          <div class="details-title">
            {{ $t("zz.functional_characteristics") }}
          </div>
          <div class="flex-2">
            <div
              class="flex-2-item"
              v-for="(item, index) in list1"
              :key="index"
            >
              <sim-card :title="item.title" :content="item.content"></sim-card>
            </div>
          </div>
        </div>
        <div>
          <div class="details-title">{{ $t("zz.application_scenarios") }}</div>
          <div class="flex-2">
            <div
              class="flex-2-item"
              v-for="(item, index) in list2"
              :key="index"
            >
              <sim-card :title="item.title" :content="item.content"></sim-card>
            </div>
          </div>
        </div>
      </div>
    </zz-sub-nav>
  </div>
</template>

<script>
import SubNav from "@/components/SubNav/index.vue";
import ZzCard from "@/components/ZzCard";
import SimCard from "@/components/SimCard";

export default {
  data() {
    return {
      index: 1,
      subIndex: 1,
      height: 230,
      titleSize: 20,
    };
  },

  components: {
    "zz-sub-nav": SubNav,
    ZzCard,
    SimCard,
  },
  props: {},
  mounted() {},
  computed: {
    activeItem: function () {
      let activeItem = this.list.find((v) => v.index == this.index);
      console.log(this.list[this.index]);
      this.subIndex = activeItem.child ? activeItem.child[0].index : 1;
      return activeItem;
    },

    list: function () {
      return [
        {
          name: this.$t("zz.functional_characteristics"),
          index: 1,
          title: this.$t("zz.functional_characteristics"),
        },
        {
          name: this.$t("zz.application_scenarios"),
          index: 2,
          title: this.$t("zz.application_scenarios"),
        },
      ];
    },
    list1: function () {
      return [
        {
          title: this.$t("zz.basics.msg.1.title"),
          content: this.$t("zz.basics.msg.1.des"),
        },
        {
          title: this.$t("zz.basics.msg.2.title"),
          content: this.$t("zz.basics.msg.2.des"),
        },
        {
          title: this.$t("zz.basics.msg.3.title"),
          content: this.$t("zz.basics.msg.3.des"),
        },
        {
          title: this.$t("zz.basics.msg.4.title"),
          content: this.$t("zz.basics.msg.4.des"),
        },
      ];
    },
    list2: function () {
      return [
        {
          title: this.$t("zz.basics.msg.5.title"),
          content: this.$t("zz.basics.msg.5.des"),
        },
        {
          title: this.$t("zz.basics.msg.6.title"),
          content: this.$t("zz.basics.msg.6.des"),
        },
        {
          title: this.$t("zz.basics.msg.7.title"),
          content: this.$t("zz.basics.msg.7.des"),
        },
        {
          title: this.$t("zz.basics.msg.8.title"),
          content: this.$t("zz.basics.msg.8.des"),
        },
      ];
    },
  },
  watch: {},
  methods: {
    navClick(a_item) {
      console.log(a_item);
      this.subIndex = a_item.index;
    },
  },
  destroyed() {},
};
</script>
<style lang='scss' scoped>
@import "@/style/variables.scss";

.sub-nav-content {
  padding: 12px 48px;
  flex: 1;
  width: 100%;
  .pro-title {
    color: $color;
    font-size: 20px;
    padding: 20px 45px;
    border-bottom: 1px solid $border;
  }
  .pro-intro-wrap {
    padding: 30px 48px;
  }
  img {
  }
  & > ul {
    width: auto;
    margin: 0 auto;
  }
}
.son-pro-wrap {
  display: flex;
  // justify-content: space-between;
  margin-top: 48px;
  flex-wrap: wrap;
  & > div {
    width: 240px;
    margin-right: 40px;
  }
}
.pro-pailie-wrap {
  .card-wrap {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    & > div {
      width: 40%;
      margin: 0 5% 30px;
      img {
        margin-top: 0;
        width: 32px;
        margin-right: 10px;
      }
      h6 {
        font-size: 22px;
        line-height: 32px;
        margin: 15px 0 20px;
      }
      p {
        font-size: 14px;
        line-height: 25px;
      }
    }
  }
}
.business-wrap {
  padding: 50px 0;
  h6 {
    font-size: 16px;
    margin: 50px 0 25px;
  }
  ul {
    padding-left: 25px;
    li {
      color: rgba(59, 59, 59, 1);
      font-size: 14px;
      line-height: 200%;
    }
  }
  p {
    font-size: 14px;
  }
}
.list-has-poi {
  list-style-type: disc;
  li {
    list-style-type: disc;
  }
}
</style>